package com.home.cca.model;

import com.google.gson.annotations.SerializedName;

import java.util.List;

public class Result<T> {

    @SerializedName("IsSuccess")
    private boolean isSuccess;

    @SerializedName("Code")
    private int code;

    @SerializedName("Message")
    private String message;

    @SerializedName("Data")
    private List<T> data;

    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean success) {
        this.isSuccess = success;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "ApiResponse{" +
                "isSuccess=" + isSuccess +
                ", code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}